package com.qifan.energy.bean.result;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

public class Page2<T> extends Pagination2 implements Serializable {

    private List<T> list = new LinkedList<T>();

    public Page2() {}

    public Page2(Pagination2 pagination) {
        super(pagination);
    }

    public List<T> getList() {
        return list;
    }

    public Page2<T> addItem(T obj) {
        list.add(obj);
        return this;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "Page [items=" + list + ", super=" + super.toString() + "]";
    }
}
